/**
 * Created by Yu Jin Xian on 2016/11/29.
 */
var express = require('express');
var app = express();

app.get('/headers', function (req, res) {
    res.set('Content-Type', 'text/plain');
    var s = '';
    for (var item in req.headers) {
        s += item + ': ' + req.headers[item] + '\n';
    }
    res.send(s);
});

app.disable('x-powered-by');

app.listen(3000, function () {
    console.log('http://localhost:3000');
});